package com.itheima;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @ProjectName: shixun DaErXia
 * @Titile: Student
 * @Author: 雨
 * @Description: TODO
 */
@Data
@AllArgsConstructor
public class Student implements Comparable<Student> {
    private String name;
    private int age;

    @Override
    public int compareTo(Student o){
        return this.age-o.getAge();
    }
}

